package cn.schoolwow.util.test.module.check.instance.flow;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.util.domain.check.instance.CheckInstance;
import cn.schoolwow.util.test.module.check.common.domain.TargetValueModifyApplyRequest;

public class CheckTargetValueModifyApplyRequestFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        TargetValueModifyApplyRequest targetValueModifyApplyRequest = new TargetValueModifyApplyRequest();
        targetValueModifyApplyRequest.projectName = "项目";
        targetValueModifyApplyRequest.beforeValue = new String[]{"1","2","3"};
        targetValueModifyApplyRequest.afterValue = new String[]{"3","2","1"};

        CheckInstance.newCheck()
                .notEmptyCheck(targetValueModifyApplyRequest.beforeValue, "修改前的值")
                .notEmptyCheck(targetValueModifyApplyRequest.afterValue, "修改后的值");
    }

    @Override
    public String name() {
        return "检查目标值修改申请实例";
    }
}
